package com.bootdo.member.dao;

import com.bootdo.member.domain.ShequUserAddress;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 
 * @author lujingqian
 * @email 2100272728@qq.com
 * @date 2019-11-11 15:04:30
 */
@Mapper
public interface ShequUserAddressDao {

	ShequUserAddress get(Long id);
	
	List<ShequUserAddress> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(ShequUserAddress shequUserAddress);
	
	int update(ShequUserAddress shequUserAddress);
	
	int remove(Long id);
	
	int batchRemove(Long[] ids);
	@Update("update me_shequ_user_address set is_default=0 where id!=#{id} and uid=#{uid}")
	int updateAllNotDefault(@Param("id") Long id,@Param("uid") Long uid);
}
